package home.axis2.creditcard;

public class CreditCardServicePortTypeProxy implements home.axis2.creditcard.CreditCardServicePortType {
  private String _endpoint = null;
  private home.axis2.creditcard.CreditCardServicePortType creditCardServicePortType = null;
  
  public CreditCardServicePortTypeProxy() {
    _initCreditCardServicePortTypeProxy();
  }
  
  public CreditCardServicePortTypeProxy(String endpoint) {
    _endpoint = endpoint;
    _initCreditCardServicePortTypeProxy();
  }
  
  private void _initCreditCardServicePortTypeProxy() {
    try {
      creditCardServicePortType = (new home.axis2.creditcard.CreditCardServiceLocator()).getCreditCardServiceHttpSoap11Endpoint();
      if (creditCardServicePortType != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)creditCardServicePortType)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)creditCardServicePortType)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (creditCardServicePortType != null)
      ((javax.xml.rpc.Stub)creditCardServicePortType)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public home.axis2.creditcard.CreditCardServicePortType getCreditCardServicePortType() {
    if (creditCardServicePortType == null)
      _initCreditCardServicePortTypeProxy();
    return creditCardServicePortType;
  }
  
  public void creditCardReset(java.lang.Integer param0) throws java.rmi.RemoteException{
    if (creditCardServicePortType == null)
      _initCreditCardServicePortTypeProxy();
    creditCardServicePortType.creditCardReset(param0);
  }
  
  public java.lang.Integer creditCardManager(java.lang.Float value, java.lang.String cardNumber, java.lang.String securityCode, java.lang.String ownerName, java.lang.Integer expirationDate, java.lang.Integer operatorID) throws java.rmi.RemoteException{
    if (creditCardServicePortType == null)
      _initCreditCardServicePortTypeProxy();
    return creditCardServicePortType.creditCardManager(value, cardNumber, securityCode, ownerName, expirationDate, operatorID);
  }
  
  
}